home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 2⁄2⁄90 / 0604-Re OpenOld-Feb90 < prev    next >
Encoding:
Text File  |  1990-02-02  |  1.9 KB  |  56 lines  |  [TEXT/GEOL]

  1. Item    2582494                         2-Feb-90        10:34PST
  2.  
  3. From:   D0416                           Futuresoft System Design,PRT
  4.  
  5. To:     D4453                           Technically Soft, Chris Lang,PRT
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    RE-OpenOld
  10.  
  11. Chris,
  12.  
  13. RE: “Calling OpenWD with the info given above yields either error
  14. -35, volume not found,  or -120, directory not found.”
  15.  
  16. I am by no means an expert with the File Manager and perhaps Curtis, who has
  17. more experience in this area will provide the correct answer. But I did notice
  18. a possible error in your code.
  19.  
  20. You do a PBHGetFInfo(@theBlk,false) call to get the theBlk.ioNamePtr and
  21. theBlk.ioVRefNum. After that you assign in param block (called pb) and call
  22. PBOpenWD which is giving you an error.
  23.        with Pb do begin        { same stuff as above }
  24.            ioNameptr:=theBlk.ioNamePtr;
  25.            ioVRefNum:=theBlk.ioVRefNum;
  26.            ioWDIndex:=0;
  27.            ioWDProcID:=0;
  28.            ioWDVRefNum:=ioVRefNum
  29.            end;
  30.        error:=PBOpenWD(@Pb,false);
  31.  
  32. Inside Mac says that “You can also specify the directory using a combination of
  33. partial pathname and directory ID” for PBOpen calls which is what you are doing
  34. except for one thing. Doesn’t theBlk.ioNamePtr which you assign to pb.ioNamePtr
  35. contain a _FULL_ pathname to the FILE that you previously got file info? If so
  36. that would mean you used a FULL pathname to a file instead of a PARTIAL
  37. pathname to a directory. Hence a “directory/volume not found” error.
  38.  
  39. I would try the other form of PBOpenWD (according to IM) and just specify
  40. pb.ioVRefNum and pb.ioWDVRefNum without specifying pb.ioNamePtr (not sure but I
  41. think you assign it NIL)
  42.        with Pb do begin
  43.            ioNameptr:=NIL;
  44.            ioVRefNum:=theBlk.ioVRefNum;
  45.            ioWDIndex:=0;
  46.            ioWDProcID:=0;
  47.            ioWDVRefNum:=ioVRefNum
  48.            end;
  49.        error:=PBOpenWD(@Pb,false);
  50.  
  51.  
  52. Hope this isn’t blind leading blind,
  53. -Ken
  54.  
  55.  
  56.